static var state = "a";
static {
    var states = {
        foo: "b"
    };
}

<p>${(states["foo"] || state)[0].toUpperCase()}</p>